import React from 'react'
import { useLocation, useNavigate } from 'react-router-dom'
import { NavBar,List } from 'antd-mobile'

const Deail = () => {
    const { state } = useLocation()
    const nav = useNavigate()
    return (
        <div>
            <NavBar onBack={() => nav("/")}>详情</NavBar>
            <List>
            <List.Item>
                <img src={state.image} alt="" style={{ width: "100%", height: "200px" }} />
                <span>{state.title}</span>
                <span>￥{state.price}</span>
            </List.Item>
            </List>
            
        </div>
    )
}

export default Deail
